<!DOCTYPE html>
<html lang="en">
<html lang="zh-CN" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>article detail</title>
    <link rel="stylesheet" type="text/css" href="/lib/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="/css/global.css">
</head>
<body>
<script src="/lib/js/vue.js"></script>
<script src="/lib/js/axios.min.js"></script>
<!--头部导航栏-->
<div class="layui-header">
    <ul class="layui-nav">
        <li class="layui-nav-item"><a href="/pages/index.html"><img src="/img/gamehub.png"></a></li>
    </ul>
    <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item">
            <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="文明" class="layui-input">
        </li>

        <li class="layui-nav-item"><a v-on:click="gotoGame"><img src="/img/search.png"></a></li>

        <li class="layui-nav-item">
            <a href="/pages/userLogin.html" class="login" onclick="openlogin()">登录</a>
        </li>

        <li class="layui-nav-item">
            <a href="/pages/userRegiste.html" class="enroll" onclick="openregister()">注册</a>
        </li>
    </ul>
</div>
<div id="app">
    <h1> {{ article }}</h1>
    <button>
        <a @click="loginCheck" src="">登录测试</a>
    </button>
</div>


<script type="text/javascript">
    var vm = new Vue({
            el: "#app",
            data: {
                news: {
                    aid: 11,
                    title: "震惊，某游戏竟然。。。",
                    newsDate: Date.parse("2020-07-17"),
                },
                article: null,
                articleDetail: null,
            },
            method: {
                loginCheck: function () {
                    axios.post('/user/login', {username: 'sumover', password: '23333'})
                        .then(function (response) {
                            console.log(response.data.message);
                            console.log(response.data.data);
                        })
                        .catch(function (error) {
                            console.log(error);
                        });
                }
            },
            mounted: function () {
            },
        }
    );
</script>

</body>
</html>